/************************************************************************
 * @file StandardStatusBarManager.cpp
 * @author Ian Chen
 * @version 1.0
 *
 * @section LICENSE
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 3 of
 * the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
 * General Public License for more details at
 * http://www.gnu.org/licenses/lgpl.html
 *
 ************************************************************************/
#include <pluginui/manager/spi/StandardStatusBarManager.h>

namespace antu
{
namespace plugin
{
namespace ui
{
StandardStatusBarManager::StandardStatusBarManager(QStatusBar* pStatusBar)
    : AbstractStatusBarManager(),
      m_pStatusBar(pStatusBar)
{
    Q_ASSERT(this->m_pStatusBar != nullptr);
}

void StandardStatusBarManager::showMessage(const QString &message, int timeoutInSeconds)
{
    this->m_pStatusBar->showMessage(message, timeoutInSeconds);
}

void StandardStatusBarManager::appendPermanentStatusBarItem(QWidget *pStatusBarItem, int stretch)
{
    this->m_pStatusBar->addPermanentWidget(pStatusBarItem, stretch);
}

void StandardStatusBarManager::clearMessage()
{
    this->m_pStatusBar->clearMessage();
}

void StandardStatusBarManager::appendStatusBarItem(QWidget *pStatusBarItem, int stretch)
{
    this->m_pStatusBar->addWidget(pStatusBarItem, stretch);
}

void StandardStatusBarManager::removeStatusBarItem(QWidget *pStatusBarItem)
{
    this->m_pStatusBar->removeWidget(pStatusBarItem);
}

}
}
}

